# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=iis-shortname-scanner
pkgver=5.4ad4937
pkgrel=4
pkgdesc='An IIS shortname Scanner.'
groups=('blackarch' 'blackarch-scanner')
arch=('any')
url='https://github.com/lijiejie/IIS_shortname_Scanner'
license=('custom:unknown')
depends=('python2')
makedepends=('git')
source=("$pkgname::git+https://github.com/lijiejie/IIS_shortname_Scanner.git")
sha512sums=('SKIP')

pkgver() {
	cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  sed -i 's|env python|env python2|' iis_shortname_Scan.py
}

package() {
	cd $pkgname

  install -Dm 755 iis_shortname_Scan.py "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
}

